/* GUI CONVERTED from rcsqsxrp.p (converter v1.75) Tue Apr 10 12:05:59 2001 */
/* rcsqsxrp.p - SEQUENCE CROSS-REFERENCE REPORT                               */
/* Copyright 1986-2002 QAD Inc., Carpinteria, CA, USA.                        */
/* All rights reserved worldwide.  This is an unpublished work.               */
/* $Revision: 1.16 $                                                        */
/*V8:ConvertMode=Report                                                       */
/* REVISION: 9.1            CREATED: 06/14/99 BY: *N003* Steve Nugent         */
/* REVISION: 9.1      LAST MODIFIED: 03/24/00 BY: *N08T* Annasaheb Rahane     */
/* REVISION: 9.1      LAST MODIFIED: 05/17/00 BY: *N0BP* Patrick Rowan        */
/* REVISION: 9.1      LAST MODIFIED: 08/12/00 BY: *N0KP* Mark Brown           */
/* REVISION: 9.1      LAST MODIFIED: 09/06/00 BY: *N0RG* Mudit Mehta          */
/* $Revision: 1.16 $    BY: Jean Miller        DATE: 03/22/01  ECO: *P008*     */
/******************************************************************************/
/* All patch markers and commented out code have been removed from the source */
/* code below. For all future modifications to this file, any code which is   */
/* no longer required should be deleted and no in-line patch markers should   */
/* be added.  The ECO marker should only be included in the Revision History. */
/******************************************************************************/

/*                                                                          */
/* -----  W A R N I N G  -----  W A R N I N G  -----  W A R N I N G  -----  */
/*                                                                          */
/*         THIS PROGRAM IS A BOLT-ON TO STANDARD PRODUCT MFG/PRO.           */
/* ANY CHANGES TO THIS PROGRAM MUST BE PLACED ON A SEPARATE ECO THAN        */
/* STANDARD PRODUCT CHANGES.  FAILURE TO DO THIS CAUSES THE BOLT-ON CODE TO */
/* BE COMBINED WITH STANDARD PRODUCT AND RESULTS IN PATCH DELIVERY FAILURES.*/
/*                                                                          */
/* -----  W A R N I N G  -----  W A R N I N G  -----  W A R N I N G  -----  */
/*                                                                          */


/*GUI preprocessor directive settings */
&SCOPED-DEFINE PP_GUI_CONVERT_MODE REPORT

{mfdtitle.i}

/* ********** Begin Translatable Strings Definitions ********** */

&SCOPED-DEFINE  rcsqsxrp_p_3 "Shipper ID"
/* Maxlen:10 Comment:  The identification number of the shipper which contains
this sequence number */

/* ********** End Translatable Strings Definitions ********** */

define variable shipfrom like rcsx_shipfrom no-undo.
define variable shipfrom1 like rcsx_shipfrom no-undo label {t001.i}.
define variable shipto like rcsx_shipto no-undo.
define variable shipto1 like rcsx_shipto no-undo label {t001.i}.
define variable rel like rcsx_rlse_id no-undo.
define variable rel1 like rcsx_rlse_id no-undo label {t001.i}.
define variable custjob_from like rcsx_cust_job no-undo.
define variable custjob_to like rcsx_cust_job no-undo label {t001.i}.
define variable sequence like rcsx_cust_seq no-undo.
define variable sequence1 like rcsx_cust_seq no-undo label {t001.i}.
define variable part like rcsx_part no-undo.
define variable part1 like rcsx_part no-undo label {t001.i}.
define variable seqdate like rcsx_date no-undo.
define variable seqdate1 like rcsx_date no-undo label {t001.i}.
define variable seqtime like rcsx_time no-undo.
define variable seqtime1 like rcsx_time no-undo label {t001.i}.
define variable custref like rcsx_cust_ref no-undo.
define variable custref1 like rcsx_cust_ref no-undo label {t001.i}.
define variable dock like rcsx_dock no-undo.
define variable dock1 like rcsx_dock no-undo label {t001.i}.
define variable line_feed like rcsx_line_feed no-undo.
define variable line_feed1 like rcsx_line_feed no-undo label {t001.i}.
define variable shipfrom_name like si_desc no-undo.

define variable shipto_name like cm_sort no-undo.
define variable shipped as character format "x(16)" no-undo.
define variable linked  as character format "x(15)" no-undo.
define variable ship_underline as character no-undo format "x(16)"
   initial "----------------".
define variable link_underline as character no-undo format "x(15)"
   initial "---------------".
define variable shipper_id like abss_ship_id format "x(20)"
   label {&rcsqsxrp_p_3} no-undo.

assign
   shipped = getTermLabel("SHIPPED_SEQUENCE",16)
   linked  = getTermLabel("LINKED_SEQUENCE",15).


/*GUI preprocessor Frame A define */
&SCOPED-DEFINE PP_FRAME_NAME A

FORM /*GUI*/ 
   
 RECT-FRAME       AT ROW 1 COLUMN 1.25
 RECT-FRAME-LABEL AT ROW 1 COLUMN 3 NO-LABEL VIEW-AS TEXT SIZE-PIXELS 1 BY 1
 SKIP(.1)  /*GUI*/
shipfrom     colon 20
   shipfrom1    colon 45
   shipto       colon 20
   shipto1      colon 45
   rel          colon 20 view-as fill-in size 20 by 1
   rel1         colon 45
   custjob_from colon 20 view-as fill-in size 20 by 1
   custjob_to   colon 45
   sequence     colon 20 view-as fill-in size 20 by 1
   sequence1    colon 45
   part         colon 20 view-as fill-in size 20 by 1
   part1        colon 45
   custref      colon 20 view-as fill-in size 20 by 1
   custref1     colon 45
   dock         colon 20 view-as fill-in size 20 by 1
   dock1        colon 45
   line_feed     colon 20 view-as fill-in size 20 by 1
   line_feed1    colon 45
   seqdate      colon 20
   seqtime      no-label
   seqdate1     colon 45
   seqtime1     no-label
   skip(1)
with frame a side-labels width 80 attr-space NO-BOX THREE-D /*GUI*/.

 DEFINE VARIABLE F-a-title AS CHARACTER INITIAL "".
 RECT-FRAME-LABEL:SCREEN-VALUE in frame a = F-a-title.
 RECT-FRAME-LABEL:HIDDEN in frame a = yes.
 RECT-FRAME:HEIGHT-PIXELS in frame a =
  FRAME a:HEIGHT-PIXELS - RECT-FRAME:Y in frame a - 2.
 RECT-FRAME:WIDTH-CHARS IN FRAME a = FRAME a:WIDTH-CHARS - .5.  /*GUI*/

/*GUI preprocessor Frame A undefine */
&UNDEFINE PP_FRAME_NAME



/* SET EXTERNAL LABELS */
setFrameLabels(frame a:handle).

FORM /*GUI*/ 
   rcsx_shipfrom          colon 10
   shipfrom_name          at 20 no-label
   rcsx_shipto            colon 10
   shipto_name            at 20 no-label
   skip(1)
   shipped                at 22 no-label
   linked                 at 72 no-label
   ship_underline         at 22 no-label
   link_underline         at 72 no-label
   rcsx_shipped_rlse_id   colon 30
   rcsx_rlse_id           colon 80
   rcsx_shipped_cust_job  colon 30
   rcsx_cust_job          colon 80
   rcsx_shipped_cust_seq  colon 30
   rcsx_cust_seq          colon 80
   rcsx_shipped_part      colon 30
   rcsx_part              colon 80
   rcsx_shipped_date      colon 30
   rcsx_date              colon 80
   rcsx_shipped_time      colon 30
   rcsx_time              colon 80
   rcsx_shipped_cust_ref  colon 30
   rcsx_cust_ref          colon 80
   rcsx_shipped_dock      colon 30
   rcsx_dock              colon 80
   rcsx_shipped_line_feed colon 30
   rcsx_line_feed         colon 80
   rcsx_picked            colon 30
   rcsx_shipped           colon 30
   shipper_id             colon 30
   skip(2)
with STREAM-IO /*GUI*/  frame b down side-labels width 132 no-box.

/* SET EXTERNAL LABELS */
setFrameLabels(frame b:handle).

{wbrp01.i}

repeat:
   if shipfrom1 = hi_char then shipfrom1 = "".
   if shipto1 = hi_char then shipto1 = "".
   if rel1 = hi_char then rel1 = "".
   if custjob_to = hi_char then custjob_to = "".
   if sequence1 = hi_char then sequence1 = "".
   if part1 = hi_char then part1 = "".
   if seqdate = low_date then seqdate = ?.
   if seqdate1 = hi_date then seqdate1 = ?.
   if seqtime1 = hi_char then seqtime1 = "".
   if custref1 = hi_char then custref1 = "".
   if dock1 = hi_char then dock1 = "".
   if line_feed1 = hi_char then line_feed1 = "".

   if (c-application-mode <> "WEB") then
   update
      shipfrom
      shipfrom1
      shipto
      shipto1
      rel
      rel1
      custjob_from
      custjob_to
      sequence
      sequence1
      part
      part1
      custref
      custref1
      dock
      dock1
      line_feed
      line_feed1
      seqdate
      seqtime
      seqdate1
      seqtime1
   with frame a.

   {wbrp06.i &command = update
      &fields = "shipfrom shipfrom1 shipto shipto1 rel rel1
                 custjob_from custjob_to
                 sequence sequence1
                 part part1 custref custref1
                 dock dock1 line_feed line_feed1
                 seqdate seqdate1 seqtime seqtime1"
      &frm = "a"}

   if (c-application-mode <> "WEB") or
      (c-application-mode <> "WEB"  and
      (c-web-request begins "DATA"))
   then do:

      bcdparm = "".
      {mfquoter.i shipfrom}
      {mfquoter.i shipfrom1}
      {mfquoter.i shipto}
      {mfquoter.i shipto1}
      {mfquoter.i rel}
      {mfquoter.i rel1}
      {mfquoter.i custjob_from}
      {mfquoter.i custjob_to}
      {mfquoter.i sequence}
      {mfquoter.i sequence1}
      {mfquoter.i part}
      {mfquoter.i part1}
      {mfquoter.i custref}
      {mfquoter.i custref1}
      {mfquoter.i dock}
      {mfquoter.i dock1}
      {mfquoter.i line_feed}
      {mfquoter.i line_feed1}
      {mfquoter.i seqdate}
      {mfquoter.i seqdate1}
      {mfquoter.i seqtime}
      {mfquoter.i seqtime1}

   end. /* if c-application-mode <> WEB */

   if shipfrom1 = "" then shipfrom1 = hi_char.
   if shipto1 = "" then shipto1 = hi_char.
   if rel1 = "" then rel1 = hi_char.
   if custjob_to = "" then custjob_to = hi_char.
   if sequence1 = "" then sequence1 = hi_char.
   if part1 = "" then part1 = hi_char.
   if seqdate = ? then seqdate = low_date.
   if seqdate1 = ? then seqdate1 = hi_date.
   if seqtime1 = "" then seqtime1 = hi_char.
   if custref1 = "" then custref1 = hi_char.
   if dock1 = "" then dock1 = hi_char.
   if line_feed1 = "" then line_feed1 = hi_char.

   /* OUTPUT DESTINATION SELECTION */
   {gpselout.i &printType = "printer"
               &printWidth = 132
               &pagedFlag = " "
               &stream = " "
               &appendToFile = " "
               &streamedOutputToTerminal = " "
               &withBatchOption = "yes"
               &displayStatementType = 1
               &withCancelMessage = "yes"
               &pageBottomMargin = 6
               &withEmail = "yes"
               &withWinprint = "yes"
               &defineVariables = "yes"}
/*GUI*/ RECT-FRAME:HEIGHT-PIXELS in frame a = FRAME a:HEIGHT-PIXELS - RECT-FRAME:Y in frame a - 2.

   {mfphead.i}

   for each rcsx_ref no-lock where
            rcsx_shipfrom >= shipfrom and rcsx_shipfrom <= shipfrom1 and
            rcsx_shipto >= shipto and rcsx_shipto <= shipto1         and
            rcsx_shipped_rlse_id >= rel and
            rcsx_shipped_rlse_id <= rel1                        and
            rcsx_shipped_cust_job >= custjob_from and
            rcsx_shipped_cust_job <= custjob_to                 and
            rcsx_shipped_cust_seq >= sequence and
            rcsx_shipped_cust_seq <= sequence1                  and
            rcsx_shipped_part >= part and rcsx_shipped_part <= part1 and
            rcsx_shipped_date >= seqdate and
            rcsx_shipped_date <= seqdate1                       and
            rcsx_shipped_time >= seqtime and
            rcsx_shipped_time <= seqtime1                       and
            rcsx_shipped_cust_ref >= custref and
            rcsx_shipped_cust_ref <= custref1                   and
            rcsx_shipped_dock >= dock and
            rcsx_shipped_dock <= dock1                          and
            rcsx_shipped_line_feed >= line_feed and
            rcsx_shipped_line_feed <= line_feed1
   by rcsx_shipfrom by rcsx_shipto by rcsx_shipped_rlse_id
   by rcsx_shipped_cust_job by rcsx_shipped_cust_seq
   by rcsx_shipped_part by rcsx_shipped_date
   by rcsx_shipped_time by rcsx_shipped_cust_ref
   by rcsx_shipped_dock by rcsx_shipped_line_feed:

      for first si_mstr
      where si_site = rcsx_shipfrom
      no-lock: end.

      if available si_mstr then
         shipfrom_name = si_desc.
      else
         shipfrom_name = "".

      for first ad_mstr
      where ad_addr = rcsx_shipto
      no-lock: end.

      if available ad_mstr then
         shipto_name = ad_sort.
      else
         shipto_name = "".

      for first abss_det where
                abss_shipfrom = rcsx_shipfrom              and
                abss_shipto = rcsx_shipto                  and
                abss_rlse_id = rcsx_shipped_rlse_id        and
                abss_cust_job = rcsx_shipped_cust_job      and
                abss_cust_seq = rcsx_shipped_cust_seq      and
                abss_part = rcsx_shipped_part              and
                abss_date = rcsx_shipped_date              and
                abss_time = rcsx_shipped_time              and
                abss_dock = rcsx_shipped_dock              and
                abss_line_feed = rcsx_shipped_line_feed    and
                abss_cust_ref = rcsx_shipped_cust_ref
      no-lock:
         assign
            shipper_id = abss_ship_id.
      end.

      display
         rcsx_shipfrom
         shipfrom_name
         rcsx_shipto
         shipto_name
         shipped
         linked
         ship_underline
         link_underline
         rcsx_shipped_rlse_id
         rcsx_rlse_id
         rcsx_shipped_cust_job
         rcsx_cust_job
         rcsx_shipped_cust_seq
         rcsx_cust_seq
         rcsx_shipped_part
         rcsx_part
         rcsx_shipped_date
         rcsx_date
         rcsx_shipped_time
         rcsx_time
         rcsx_shipped_cust_ref
         rcsx_cust_ref
         rcsx_shipped_dock
         rcsx_dock
         rcsx_shipped_line_feed
         rcsx_line_feed
         rcsx_picked
         rcsx_shipped
         substring(shipper_id,2) @ shipper_id
      with frame b STREAM-IO /*GUI*/ .

      
/*GUI*/ {mfguichk.i } /*Replace mfrpchk*/


      down with frame b.

   end. /* for each rcsx_det */

   {mfrtrail.i}

end. /* repeat */

{wbrp04.i &frame-spec = a}
